package com.cjh.admin.controller;

import com.alibaba.fastjson.JSON;
import com.cjh.admin.config.TokenThreadLocal;
import com.cjh.common.dto.EvaluatePagingDTO;
import com.cjh.common.dto.StoreOrderPagingDTO;
import com.cjh.common.response.Result;
import com.cjh.common.service.EvaluateService;
import com.cjh.common.service.StoreOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/evaluate")
public class EvaluateController {

    @Autowired
    EvaluateService evaluateService;

    @ApiOperation("根据权限获取分页订单评价")
    @GetMapping("/getPagingStoreEvaluate")
    public Result getPagingStoreEvaluate(@RequestParam String evaluatePagingDTO){
        EvaluatePagingDTO evaluatePagingDTO1 = JSON.parseObject(evaluatePagingDTO, EvaluatePagingDTO.class);
        evaluatePagingDTO1.setUsername(TokenThreadLocal.get());
        return evaluateService.getPagingStoreEvaluate(evaluatePagingDTO1);
    }
}
